package com.lablzh.gdxy.service;

import com.lablzh.gdxy.entity.*;
import org.apache.commons.fileupload.FileUploadException;
import org.springframework.beans.factory.annotation.Autowired;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.SQLIntegrityConstraintViolationException;

public interface UserService {

        //注册
    String addStudent(Student student);
    boolean checkLogin(String username,String password,String role) throws Exception;
    String gainEmail(String role, String username) ;
    String generateUrl(String basePath,String account,String username) throws Exception;
    String studentBatch(HttpServletRequest request) throws FileUploadException, IOException;

    String teacherBatch(HttpServletRequest request) throws IOException, FileUploadException;

    String arrangeSeat(Integer number, String classroom, HttpServletRequest request, HttpServletResponse response) throws FileNotFoundException;

    String assistantBatch(HttpServletRequest request) throws FileUploadException, IOException;

    String updatePassword(Password password);

    String addTeacher(Teacher teacher);

    String addAdmin(Admin admin);

    String deleteTeacher(Integer id);

    String deleteStudent(Integer id);
    String deleteAdmin(Integer id);
    String addInstructor(Instructor instructor);
    String deleteInstructor(Integer id);

    String addStudent1(Student student);
    String addTeacher1(Teacher teacher);
}
